import React, {Component} from 'react';
import {
    StyleSheet,
    Text,
    View,
    Image,
    TouchableOpacity,
} from 'react-native';
/**
 * 由 WangYu 创建
 * 日期 2017/9/14
 */
export default class HomeComponentTitleView extends Component {

    constructor(props) {
        super(props);
    }

    render() {
        return (
            <View style={styles.container}>
                <View style={styles.leftStyle}>
                    <Image source={{uri:this.props.leftIcon}} style={{width:26,height:26}} resizeMode={'contain'}/>
                    <Text style={{fontSize:16,marginLeft:5}}>{this.props.leftTitle}</Text>
                </View>
                <View style={styles.rightStyle}>
                    <Text>{this.props.rightTitle}</Text>
                    <Image source={{uri:'home_arrow'}} style={{width:15,height:15, marginLeft:5}}/>
                </View>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        height:50,
        flexDirection:'row',
        alignItems:'center',
        justifyContent:'space-between',
        paddingLeft:10,
        paddingRight:10,
        backgroundColor:'white',
        borderBottomWidth:1,
        borderBottomColor:"#e8e8e8"
    },
    leftStyle:{
        flex:1,
        flexDirection:'row',
        alignItems:'center'
    },
    rightStyle:{
        flexDirection:'row',
        alignItems:'center'
    },
});
